package com.smh.mp.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum UserStatus {
    NORMAL(1, "正常"),
    FREEZE(2, "冻结"),
    ;

    @EnumValue//告诉mybatisplus将这个的值插入到数据库
    private final int value;
    @JsonValue//返回数据是返回desc,不佳的话,返回的是枚举的名NORMAL
    private final String desc;

    UserStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

}
